import Vue from 'vue';
import VueRouter from 'vue-router';
import loginRouter from './modules/login';

Vue.use(VueRouter);

const routes = [
  {
    path: '/home',
    name: 'Home',
    component: () => import(/* webpackChunkName: "home" */ '@/views/home/index.vue')
  },
  {
    path: '/',
    redirect: '/home'
  },
  loginRouter
];

function createRouter() {
  return new VueRouter({
    routes
  });
}

const router = createRouter();

export default router;
